<template>
    <div class="singer-intro">
        <div>
            <h2>简介</h2>
            <div>{{desc}}</div>
        </div>
          <div>
            <h2>基本资料</h2>
            <div>
                <div v-for="(item, index) in basicItem" :key="index ">
                    <span>{{item.key}}:</span>
                </div>
            </div>
        </div>
    </div>
</template>

<script>

export default {
    props:["singeid"],
    data() {
      return{
          desc:"",//简介描述
          basicItem:[],//基本资料
          otherItem:[],//其他（从艺历程和荣誉记录）
      } ;
    },
    created(){
        this.getData();
    },
    methods:{
        getData(){
            this.$request("get","/singer/desc?singermid=" + this.singeid).then(
                (res)=>{
                    this.desc=res.data.desc;//获取歌手的描述
                    this.basicItem=res.data.basic.item;//获取歌手的基本资料
                    this.otherItem=res.data.onther.item;//获取歌手的其他资料
                }
            );
        },
    }
};
</script>
